/**
 * Created by zhoushg on 2017/9/8.
 */
const settings = require('@configs/settings') // 数据库的配置doracms2.1.3 大改，用了muri插件来解析
const muri = require('muri');
const parsedUri = muri(settings.mongo_connection_uri)
if(parsedUri.auth){
	mongodb = {
	  db_user: parsedUri.auth.user,
	  db_pwd: parsedUri.auth.pass,
	  db_host: parsedUri.hosts[0].host,
	  db_port: parsedUri.hosts[0].port,
	  db_name: parsedUri.db
	}
}else{
	mongodb = {
	  db_user: '',
	  db_pwd: '',
	  db_host: parsedUri.hosts[0].host,
	  db_port: parsedUri.hosts[0].port,
	  db_name: parsedUri.db
	}
}
exports.mongodb = mongodb
exports.Config = {
  outTime:1200 // 登录超时时间
}
exports.isCrossDomain = true // 是否支持跨域
